// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.
#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]

/// Implements a client for the VM Migration API.
///
/// # Example
/// ```
/// # tokio_test::block_on(async {
/// # use google_cloud_vmmigration_v1::client::VmMigration;
/// let client = VmMigration::builder().build().await?;
/// // use `client` to make requests to the VM Migration API.
/// # gax::client_builder::Result::<()>::Ok(()) });
/// ```
///
/// # Service Description
///
/// VM Migration Service
///
/// # Configuration
///
/// To configure `VmMigration` use the `with_*` methods in the type returned
/// by [builder()][VmMigration::builder]. The default configuration should
/// work for most applications. Common configuration changes include
///
/// * [with_endpoint()]: by default this client uses the global default endpoint
///   (`https://vmmigration.googleapis.com`). Applications using regional
///   endpoints or running in restricted networks (e.g. a network configured
//    with [Private Google Access with VPC Service Controls]) may want to
///   override this default.
/// * [with_credentials()]: by default this client uses
///   [Application Default Credentials]. Applications using custom
///   authentication may need to override this default.
///
/// [with_endpoint()]: super::builder::vm_migration::ClientBuilder::with_endpoint
/// [with_credentials()]: super::builder::vm_migration::ClientBuilder::credentials
/// [Private Google Access with VPC Service Controls]: https://cloud.google.com/vpc-service-controls/docs/private-connectivity
/// [Application Default Credentials]: https://cloud.google.com/docs/authentication#adc
///
/// # Pooling and Cloning
///
/// `VmMigration` holds a connection pool internally, it is advised to
/// create one and the reuse it.  You do not need to wrap `VmMigration` in
/// an [Rc](std::rc::Rc) or [Arc](std::sync::Arc) to reuse it, because it
/// already uses an `Arc` internally.
#[derive(Clone, Debug)]
pub struct VmMigration {
    inner: std::sync::Arc<dyn super::stub::dynamic::VmMigration>,
}

impl VmMigration {
    /// Returns a builder for [VmMigration].
    ///
    /// ```
    /// # tokio_test::block_on(async {
    /// # use google_cloud_vmmigration_v1::client::VmMigration;
    /// let client = VmMigration::builder().build().await?;
    /// # gax::client_builder::Result::<()>::Ok(()) });
    /// ```
    pub fn builder() -> super::builder::vm_migration::ClientBuilder {
        gax::client_builder::internal::new_builder(super::builder::vm_migration::client::Factory)
    }

    /// Creates a new client from the provided stub.
    ///
    /// The most common case for calling this function is in tests mocking the
    /// client's behavior.
    pub fn from_stub<T>(stub: T) -> Self
    where
        T: super::stub::VmMigration + 'static,
    {
        Self {
            inner: std::sync::Arc::new(stub),
        }
    }

    pub(crate) async fn new(
        config: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<Self> {
        let inner = Self::build_inner(config).await?;
        Ok(Self { inner })
    }

    async fn build_inner(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<std::sync::Arc<dyn super::stub::dynamic::VmMigration>> {
        if gaxi::options::tracing_enabled(&conf) {
            return Ok(std::sync::Arc::new(Self::build_with_tracing(conf).await?));
        }
        Ok(std::sync::Arc::new(Self::build_transport(conf).await?))
    }

    async fn build_transport(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::VmMigration> {
        super::transport::VmMigration::new(conf).await
    }

    async fn build_with_tracing(
        conf: gaxi::options::ClientConfig,
    ) -> gax::client_builder::Result<impl super::stub::VmMigration> {
        Self::build_transport(conf)
            .await
            .map(super::tracing::VmMigration::new)
    }

    /// Lists Sources in a given project and location.
    pub fn list_sources(&self) -> super::builder::vm_migration::ListSources {
        super::builder::vm_migration::ListSources::new(self.inner.clone())
    }

    /// Gets details of a single Source.
    pub fn get_source(&self) -> super::builder::vm_migration::GetSource {
        super::builder::vm_migration::GetSource::new(self.inner.clone())
    }

    /// Creates a new Source in a given project and location.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_source(&self) -> super::builder::vm_migration::CreateSource {
        super::builder::vm_migration::CreateSource::new(self.inner.clone())
    }

    /// Updates the parameters of a single Source.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_source(&self) -> super::builder::vm_migration::UpdateSource {
        super::builder::vm_migration::UpdateSource::new(self.inner.clone())
    }

    /// Deletes a single Source.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_source(&self) -> super::builder::vm_migration::DeleteSource {
        super::builder::vm_migration::DeleteSource::new(self.inner.clone())
    }

    /// List remote source's inventory of VMs.
    /// The remote source is the onprem vCenter (remote in the sense it's not in
    /// Compute Engine). The inventory describes the list of existing VMs in that
    /// source. Note that this operation lists the VMs on the remote source, as
    /// opposed to listing the MigratingVms resources in the vmmigration service.
    pub fn fetch_inventory(&self) -> super::builder::vm_migration::FetchInventory {
        super::builder::vm_migration::FetchInventory::new(self.inner.clone())
    }

    /// List remote source's inventory of storage resources.
    /// The remote source is another cloud vendor (e.g. AWS, Azure).
    /// The inventory describes the list of existing storage resources in that
    /// source. Note that this operation lists the resources on the remote source,
    /// as opposed to listing the MigratingVms resources in the vmmigration
    /// service.
    pub fn fetch_storage_inventory(&self) -> super::builder::vm_migration::FetchStorageInventory {
        super::builder::vm_migration::FetchStorageInventory::new(self.inner.clone())
    }

    /// Lists Utilization Reports of the given Source.
    pub fn list_utilization_reports(&self) -> super::builder::vm_migration::ListUtilizationReports {
        super::builder::vm_migration::ListUtilizationReports::new(self.inner.clone())
    }

    /// Gets a single Utilization Report.
    pub fn get_utilization_report(&self) -> super::builder::vm_migration::GetUtilizationReport {
        super::builder::vm_migration::GetUtilizationReport::new(self.inner.clone())
    }

    /// Creates a new UtilizationReport.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_utilization_report(
        &self,
    ) -> super::builder::vm_migration::CreateUtilizationReport {
        super::builder::vm_migration::CreateUtilizationReport::new(self.inner.clone())
    }

    /// Deletes a single Utilization Report.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_utilization_report(
        &self,
    ) -> super::builder::vm_migration::DeleteUtilizationReport {
        super::builder::vm_migration::DeleteUtilizationReport::new(self.inner.clone())
    }

    /// Lists DatacenterConnectors in a given Source.
    pub fn list_datacenter_connectors(
        &self,
    ) -> super::builder::vm_migration::ListDatacenterConnectors {
        super::builder::vm_migration::ListDatacenterConnectors::new(self.inner.clone())
    }

    /// Gets details of a single DatacenterConnector.
    pub fn get_datacenter_connector(&self) -> super::builder::vm_migration::GetDatacenterConnector {
        super::builder::vm_migration::GetDatacenterConnector::new(self.inner.clone())
    }

    /// Creates a new DatacenterConnector in a given Source.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_datacenter_connector(
        &self,
    ) -> super::builder::vm_migration::CreateDatacenterConnector {
        super::builder::vm_migration::CreateDatacenterConnector::new(self.inner.clone())
    }

    /// Deletes a single DatacenterConnector.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_datacenter_connector(
        &self,
    ) -> super::builder::vm_migration::DeleteDatacenterConnector {
        super::builder::vm_migration::DeleteDatacenterConnector::new(self.inner.clone())
    }

    /// Upgrades the appliance relate to this DatacenterConnector to the in-place
    /// updateable version.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn upgrade_appliance(&self) -> super::builder::vm_migration::UpgradeAppliance {
        super::builder::vm_migration::UpgradeAppliance::new(self.inner.clone())
    }

    /// Creates a new MigratingVm in a given Source.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_migrating_vm(&self) -> super::builder::vm_migration::CreateMigratingVm {
        super::builder::vm_migration::CreateMigratingVm::new(self.inner.clone())
    }

    /// Lists MigratingVms in a given Source.
    pub fn list_migrating_vms(&self) -> super::builder::vm_migration::ListMigratingVms {
        super::builder::vm_migration::ListMigratingVms::new(self.inner.clone())
    }

    /// Gets details of a single MigratingVm.
    pub fn get_migrating_vm(&self) -> super::builder::vm_migration::GetMigratingVm {
        super::builder::vm_migration::GetMigratingVm::new(self.inner.clone())
    }

    /// Updates the parameters of a single MigratingVm.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_migrating_vm(&self) -> super::builder::vm_migration::UpdateMigratingVm {
        super::builder::vm_migration::UpdateMigratingVm::new(self.inner.clone())
    }

    /// Deletes a single MigratingVm.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_migrating_vm(&self) -> super::builder::vm_migration::DeleteMigratingVm {
        super::builder::vm_migration::DeleteMigratingVm::new(self.inner.clone())
    }

    /// Starts migration for a VM. Starts the process of uploading
    /// data and creating snapshots, in replication cycles scheduled by the policy.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn start_migration(&self) -> super::builder::vm_migration::StartMigration {
        super::builder::vm_migration::StartMigration::new(self.inner.clone())
    }

    /// Resumes a migration for a VM. When called on a paused migration, will start
    /// the process of uploading data and creating snapshots; when called on a
    /// completed cut-over migration, will update the migration to active state and
    /// start the process of uploading data and creating snapshots.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn resume_migration(&self) -> super::builder::vm_migration::ResumeMigration {
        super::builder::vm_migration::ResumeMigration::new(self.inner.clone())
    }

    /// Pauses a migration for a VM. If cycle tasks are running they will be
    /// cancelled, preserving source task data. Further replication cycles will not
    /// be triggered while the VM is paused.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn pause_migration(&self) -> super::builder::vm_migration::PauseMigration {
        super::builder::vm_migration::PauseMigration::new(self.inner.clone())
    }

    /// Marks a migration as completed, deleting migration resources that are no
    /// longer being used. Only applicable after cutover is done.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn finalize_migration(&self) -> super::builder::vm_migration::FinalizeMigration {
        super::builder::vm_migration::FinalizeMigration::new(self.inner.clone())
    }

    /// Extend the migrating VM time to live.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn extend_migration(&self) -> super::builder::vm_migration::ExtendMigration {
        super::builder::vm_migration::ExtendMigration::new(self.inner.clone())
    }

    /// Initiates a Clone of a specific migrating VM.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_clone_job(&self) -> super::builder::vm_migration::CreateCloneJob {
        super::builder::vm_migration::CreateCloneJob::new(self.inner.clone())
    }

    /// Initiates the cancellation of a running clone job.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn cancel_clone_job(&self) -> super::builder::vm_migration::CancelCloneJob {
        super::builder::vm_migration::CancelCloneJob::new(self.inner.clone())
    }

    /// Lists the CloneJobs of a migrating VM. Only 25 most recent CloneJobs are
    /// listed.
    pub fn list_clone_jobs(&self) -> super::builder::vm_migration::ListCloneJobs {
        super::builder::vm_migration::ListCloneJobs::new(self.inner.clone())
    }

    /// Gets details of a single CloneJob.
    pub fn get_clone_job(&self) -> super::builder::vm_migration::GetCloneJob {
        super::builder::vm_migration::GetCloneJob::new(self.inner.clone())
    }

    /// Initiates a Cutover of a specific migrating VM.
    /// The returned LRO is completed when the cutover job resource is created
    /// and the job is initiated.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_cutover_job(&self) -> super::builder::vm_migration::CreateCutoverJob {
        super::builder::vm_migration::CreateCutoverJob::new(self.inner.clone())
    }

    /// Initiates the cancellation of a running cutover job.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn cancel_cutover_job(&self) -> super::builder::vm_migration::CancelCutoverJob {
        super::builder::vm_migration::CancelCutoverJob::new(self.inner.clone())
    }

    /// Lists the CutoverJobs of a migrating VM. Only 25 most recent CutoverJobs
    /// are listed.
    pub fn list_cutover_jobs(&self) -> super::builder::vm_migration::ListCutoverJobs {
        super::builder::vm_migration::ListCutoverJobs::new(self.inner.clone())
    }

    /// Gets details of a single CutoverJob.
    pub fn get_cutover_job(&self) -> super::builder::vm_migration::GetCutoverJob {
        super::builder::vm_migration::GetCutoverJob::new(self.inner.clone())
    }

    /// Lists Groups in a given project and location.
    pub fn list_groups(&self) -> super::builder::vm_migration::ListGroups {
        super::builder::vm_migration::ListGroups::new(self.inner.clone())
    }

    /// Gets details of a single Group.
    pub fn get_group(&self) -> super::builder::vm_migration::GetGroup {
        super::builder::vm_migration::GetGroup::new(self.inner.clone())
    }

    /// Creates a new Group in a given project and location.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_group(&self) -> super::builder::vm_migration::CreateGroup {
        super::builder::vm_migration::CreateGroup::new(self.inner.clone())
    }

    /// Updates the parameters of a single Group.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_group(&self) -> super::builder::vm_migration::UpdateGroup {
        super::builder::vm_migration::UpdateGroup::new(self.inner.clone())
    }

    /// Deletes a single Group.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_group(&self) -> super::builder::vm_migration::DeleteGroup {
        super::builder::vm_migration::DeleteGroup::new(self.inner.clone())
    }

    /// Adds a MigratingVm to a Group.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn add_group_migration(&self) -> super::builder::vm_migration::AddGroupMigration {
        super::builder::vm_migration::AddGroupMigration::new(self.inner.clone())
    }

    /// Removes a MigratingVm from a Group.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn remove_group_migration(&self) -> super::builder::vm_migration::RemoveGroupMigration {
        super::builder::vm_migration::RemoveGroupMigration::new(self.inner.clone())
    }

    /// Lists TargetProjects in a given project.
    ///
    /// NOTE: TargetProject is a global resource; hence the only supported value
    /// for location is `global`.
    pub fn list_target_projects(&self) -> super::builder::vm_migration::ListTargetProjects {
        super::builder::vm_migration::ListTargetProjects::new(self.inner.clone())
    }

    /// Gets details of a single TargetProject.
    ///
    /// NOTE: TargetProject is a global resource; hence the only supported value
    /// for location is `global`.
    pub fn get_target_project(&self) -> super::builder::vm_migration::GetTargetProject {
        super::builder::vm_migration::GetTargetProject::new(self.inner.clone())
    }

    /// Creates a new TargetProject in a given project.
    ///
    /// NOTE: TargetProject is a global resource; hence the only supported value
    /// for location is `global`.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_target_project(&self) -> super::builder::vm_migration::CreateTargetProject {
        super::builder::vm_migration::CreateTargetProject::new(self.inner.clone())
    }

    /// Updates the parameters of a single TargetProject.
    ///
    /// NOTE: TargetProject is a global resource; hence the only supported value
    /// for location is `global`.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_target_project(&self) -> super::builder::vm_migration::UpdateTargetProject {
        super::builder::vm_migration::UpdateTargetProject::new(self.inner.clone())
    }

    /// Deletes a single TargetProject.
    ///
    /// NOTE: TargetProject is a global resource; hence the only supported value
    /// for location is `global`.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_target_project(&self) -> super::builder::vm_migration::DeleteTargetProject {
        super::builder::vm_migration::DeleteTargetProject::new(self.inner.clone())
    }

    /// Lists ReplicationCycles in a given MigratingVM.
    pub fn list_replication_cycles(&self) -> super::builder::vm_migration::ListReplicationCycles {
        super::builder::vm_migration::ListReplicationCycles::new(self.inner.clone())
    }

    /// Gets details of a single ReplicationCycle.
    pub fn get_replication_cycle(&self) -> super::builder::vm_migration::GetReplicationCycle {
        super::builder::vm_migration::GetReplicationCycle::new(self.inner.clone())
    }

    /// Lists ImageImports in a given project.
    pub fn list_image_imports(&self) -> super::builder::vm_migration::ListImageImports {
        super::builder::vm_migration::ListImageImports::new(self.inner.clone())
    }

    /// Gets details of a single ImageImport.
    pub fn get_image_import(&self) -> super::builder::vm_migration::GetImageImport {
        super::builder::vm_migration::GetImageImport::new(self.inner.clone())
    }

    /// Creates a new ImageImport in a given project.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_image_import(&self) -> super::builder::vm_migration::CreateImageImport {
        super::builder::vm_migration::CreateImageImport::new(self.inner.clone())
    }

    /// Deletes a single ImageImport.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_image_import(&self) -> super::builder::vm_migration::DeleteImageImport {
        super::builder::vm_migration::DeleteImageImport::new(self.inner.clone())
    }

    /// Lists ImageImportJobs in a given project.
    pub fn list_image_import_jobs(&self) -> super::builder::vm_migration::ListImageImportJobs {
        super::builder::vm_migration::ListImageImportJobs::new(self.inner.clone())
    }

    /// Gets details of a single ImageImportJob.
    pub fn get_image_import_job(&self) -> super::builder::vm_migration::GetImageImportJob {
        super::builder::vm_migration::GetImageImportJob::new(self.inner.clone())
    }

    /// Initiates the cancellation of a running ImageImportJob.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn cancel_image_import_job(&self) -> super::builder::vm_migration::CancelImageImportJob {
        super::builder::vm_migration::CancelImageImportJob::new(self.inner.clone())
    }

    /// Creates a new disk migration job in a given Source.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn create_disk_migration_job(
        &self,
    ) -> super::builder::vm_migration::CreateDiskMigrationJob {
        super::builder::vm_migration::CreateDiskMigrationJob::new(self.inner.clone())
    }

    /// Lists DiskMigrationJobs in a given Source.
    pub fn list_disk_migration_jobs(&self) -> super::builder::vm_migration::ListDiskMigrationJobs {
        super::builder::vm_migration::ListDiskMigrationJobs::new(self.inner.clone())
    }

    /// Gets details of a single DiskMigrationJob.
    pub fn get_disk_migration_job(&self) -> super::builder::vm_migration::GetDiskMigrationJob {
        super::builder::vm_migration::GetDiskMigrationJob::new(self.inner.clone())
    }

    /// Updates the parameters of a single DiskMigrationJob.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn update_disk_migration_job(
        &self,
    ) -> super::builder::vm_migration::UpdateDiskMigrationJob {
        super::builder::vm_migration::UpdateDiskMigrationJob::new(self.inner.clone())
    }

    /// Deletes a single DiskMigrationJob.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn delete_disk_migration_job(
        &self,
    ) -> super::builder::vm_migration::DeleteDiskMigrationJob {
        super::builder::vm_migration::DeleteDiskMigrationJob::new(self.inner.clone())
    }

    /// Runs the disk migration job.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn run_disk_migration_job(&self) -> super::builder::vm_migration::RunDiskMigrationJob {
        super::builder::vm_migration::RunDiskMigrationJob::new(self.inner.clone())
    }

    /// Cancels the disk migration job.
    ///
    /// # Long running operations
    ///
    /// This method is used to start, and/or poll a [long-running Operation].
    /// The [Working with long-running operations] chapter in the [user guide]
    /// covers these operations in detail.
    ///
    /// [long-running operation]: https://google.aip.dev/151
    /// [user guide]: https://googleapis.github.io/google-cloud-rust/
    /// [working with long-running operations]: https://googleapis.github.io/google-cloud-rust/working_with_long_running_operations.html
    pub fn cancel_disk_migration_job(
        &self,
    ) -> super::builder::vm_migration::CancelDiskMigrationJob {
        super::builder::vm_migration::CancelDiskMigrationJob::new(self.inner.clone())
    }

    /// Lists information about the supported locations for this service.
    pub fn list_locations(&self) -> super::builder::vm_migration::ListLocations {
        super::builder::vm_migration::ListLocations::new(self.inner.clone())
    }

    /// Gets information about a location.
    pub fn get_location(&self) -> super::builder::vm_migration::GetLocation {
        super::builder::vm_migration::GetLocation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn list_operations(&self) -> super::builder::vm_migration::ListOperations {
        super::builder::vm_migration::ListOperations::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn get_operation(&self) -> super::builder::vm_migration::GetOperation {
        super::builder::vm_migration::GetOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn delete_operation(&self) -> super::builder::vm_migration::DeleteOperation {
        super::builder::vm_migration::DeleteOperation::new(self.inner.clone())
    }

    /// Provides the [Operations][google.longrunning.Operations] service functionality in this service.
    ///
    /// [google.longrunning.Operations]: longrunning::client::Operations
    pub fn cancel_operation(&self) -> super::builder::vm_migration::CancelOperation {
        super::builder::vm_migration::CancelOperation::new(self.inner.clone())
    }
}
